export function timerFun(f, time, idCallback, doFirst = true) {
  if (doFirst) {
    f();
  }
  let timerId;
  function backFun() {
    if (timerId) {
      clearTimeout(timerId);
    }
    timerId = setTimeout(function () {
      f();
      backFun();
    }, time);
    idCallback && idCallback(timerId);
  }
  backFun();
}
